//
//  WFServiceTableViewCell.m
//  WisdomFarm
//
//  Created by sky on 2018/2/18.
//  Copyright © 2018年 sky. All rights reserved.
//

#import "WFServiceTableViewCell.h"

@implementation WFServiceTableViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _neededLabel = [[UILabel alloc] init];
        _neededLabel.textColor = [UIColor themeColor];
        _neededLabel.font = SCFont(14);
        _neededLabel.text = @"*";
        [self.contentView addSubview:_neededLabel];
        _titleLabel = [[UILabel alloc] init];
        _titleLabel.textColor = [UIColor textTitleColor];
        _titleLabel.font = SCFont(14);
        [self.contentView addSubview:_titleLabel];
        _contentLabel = [[UILabel alloc] init];
        _contentLabel.textColor = [UIColor textContentColor];
        _contentLabel.font = SCFont(14);
        [self.contentView addSubview:_contentLabel];
        _accessoryIcon = [[UIImageView alloc] init];
        [self.contentView addSubview:_accessoryIcon];
        
        [_neededLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.offset(15);
            make.centerY.offset(0);
        }];
        [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.neededLabel.mas_right).offset(4);
            make.centerY.offset(0);
        }];
        [_contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.titleLabel.mas_right).offset(10);
            make.centerY.offset(0);
        }];
        [_accessoryIcon mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.contentLabel.mas_right).offset(4);
            make.right.offset(-14);
            make.centerY.offset(0);
        }];

    }
    return self;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
